Bentley HAMMER CONNECT Edition Help

Minimizing Effort through Attribute Inheritance

Inheritance has an application every time you hear the phrase, "just like x except for y." Rather than specifying all of the data from x again to form this new condition, we can create a child from x and change y appropriately. Now we have both conditions, with no duplicated effort.

We can even apply this inheritance to our restaurant analogy as follows. Inherited values are shown as gray text, local values are shown as black text.

Note: Salad 3 could inherit from Salad 2, if we prefer: "Salad 3 is just like Salad 2, except for the dressing."
  • "Salad 2 is just like Salad 1, except for the dressing."
  • "Salad 3 is just like Salad 1, except for the dressing."If the vegetable of the day changes (say from green beans to peas), only Entrée 1 needs to be updated, and the other entrées will automatically inherit the vegetable attribute of "Peas" instead of "Green Beans."
  • "Entrée 2 is just like Entrée 1, except for the meat and the starch."
  • "Dessert 2 is just like Dessert 1, except for the topping."